home *** CD-ROM | disk | FTP | other *** search
/ Crosscountry USA Photo Safari / Crosscountry USA Photo Safari.iso / Data / cc_base / pak00_16bit_f.pk3 / switch_player.gl.p < prev    next >
Text File  |  2002-11-29  |  2KB  |  66 lines

  1. {
  2.   Hidden = TRUE;
  3.   
  4.   ChildID = {
  5.    
  6.     GuiFullscreenPicture("switch_player") {
  7.       AnimationID = "image/switch_player.pcx";
  8.       X = 0;
  9.       Y = 0;
  10.       ScriptID = Script {
  11.         @activate{
  12.           ResPropSetInt(SELF, "timeout", 0);                     
  13.         }
  14.         @show {        
  15.           resid Player;
  16.           resid SwitchPlayerText;
  17.  
  18.           Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
  19.            
  20.           SwitchPlayerText = GuiSiblingByName("switch_player_text");
  21.   
  22.           ResPropSetStr(
  23.             SwitchPlayerText,
  24.             "InputText",
  25.             StrFormatStr(
  26.               MangleSIDToStr(231/*"%s, it's your turn to play!"*/),
  27.               ResPropGetStr(Player,"player_name")
  28.             )
  29.           );           
  30.           
  31.           ResPropSetInt(SELF,"timeout",96);   
  32.           ResPropSetInt(SwitchPlayerText,"Hidden",FALSE); 
  33.           GuiToFront(GuiParent(SELF));
  34.         }
  35.   
  36.         @animate {
  37.           int   timeout;   
  38.           ResPropAlias(SELF,"timeout","timeout");
  39.           if (timeout > 0) {
  40.             timeout -= 1;
  41.           } else {
  42.             ResPropSetInt(GuiParent(SELF),"Hidden",TRUE);
  43.           }
  44.         }
  45.       }
  46.     },
  47.   
  48.     GuiTextInput("switch_player_text") {
  49.       Y = 115;
  50.       X = 0;
  51.       InputDisabled = TRUE;
  52.       InputHorizontalAlign = CENTER;
  53.       WordWrap = TRUE;
  54.       Width = 640;
  55.       Height = 35;
  56.       FontID = "font/verdana_orange_bold_14.tf";
  57.       ScriptID = Script {
  58.         @activate{
  59.           ResPropSetInt(GuiSiblingByName("switch_player"), "timeout", 0);                     
  60.         }
  61.       }      
  62.     }
  63.  
  64.   };
  65. }
  66.